/* ==================== 科目成绩汇总样式 ==================== */

.subject-scores-container {
    margin-top: 1rem;
}

.subject-section {
    margin-bottom: 1.5rem;
}

.subject-section:last-child {
    margin-bottom: 0;
}

.subject-header {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border-left: 4px solid var(--primary-500);
}

.subject-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.series-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.series-item {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.series-item:hover {
    border-color: var(--primary-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background: white;
    transition: background-color 0.2s ease;
}

.series-header:hover {
    background: var(--gray-50);
}

.series-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.series-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.series-count {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.series-avg {
    color: var(--primary-600);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--primary-50);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.series-actions {
    display: flex;
    gap: 0.5rem;
}

.series-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.series-toggle:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
}

.series-details {
    border-top: 1px solid var(--gray-100);
}

.series-records {
    padding: 1rem;
    background: var(--gray-50);
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.record-item:last-child {
    margin-bottom: 0;
}

.record-item:hover {
    border-color: var(--primary-200);
    transform: translateX(4px);
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.record-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.record-date {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.record-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.score-value {
    font-weight: 600;
    color: var(--primary-700);
    font-size: 1rem;
    min-width: 60px;
    text-align: right;
}

.record-duration {
    color: var(--gray-500);
    font-size: 0.8rem;
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.empty-series {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.empty-series .bi {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.subject-divider {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px dashed var(--gray-300);
}

/* 搜索框样式 */
.score-search-container {
    margin-bottom: 1.5rem;
}

.score-search-input {
    max-width: 300px;
}

/* 空状态样式 */
.empty-state {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 3rem 2rem;
}

.empty-state .bi {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

/* 无结果提示 */
.no-results-message {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.no-results-message .bi {
    color: #e53e3e;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .subject-header {
        padding: 1rem;
    }

    .subject-title {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .series-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .series-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .series-actions {
        align-self: flex-end;
    }

    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .record-score {
        align-self: flex-end;
    }

    .score-search-input {
        max-width: 100%;
    }
}

/* 动画效果 */
.series-details.collapsing {
    transition: height 0.3s ease;
}

.record-item {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 系列项展开时的样式 */
.series-item.expanded {
    border-color: var(--primary-400);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.series-item.expanded .series-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, #f0f7ff 100%);
}

/* 打印样式 */
@media print {
    .student-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .card-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #333 !important;
    }

    .btn {
        display: none !important;
    }

    .series-actions {
        display: none !important;
    }

    .series-details.collapse:not(.show) {
        display: block !important;
    }

    .subject-scores-container {
        break-inside: avoid;
    }

    .series-item {
        break-inside: avoid;
        border: 1px solid #ddd !important;
    }

    .score-search-container {
        display: none !important;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 统计信息样式 */
.series-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-600);
}

.stat-item i {
    color: var(--primary-500);
}